You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > clVector Structure > clVector Methods > Reverse Method > clVector.Reverse Method ([In] TOpenCLMtxVec, int, int, int)
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
clVector.Reverse Method ([In] TOpenCLMtxVec, int, int, int)

Reverse vector elements.

Syntax
C#
Visual Basic
public TOpenCLMtxVec Reverse([In] TOpenCLMtxVec Vec, int VecIndex, int Index, int Len);

The method reverses Vec vector elements from [VecIndex].. [VecIndex+Len-1] and stores them in the calling vector from [Index]...[Index+Len-1] by using the following equation: 

 

 

 

This overload reverses calling vector elements in-place.

var a: clVector; begin a.CopyFromArray(TSingleArray.Create(1,2,3,4)); a.Reverse; // a = [4,3,2,1] end;
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!